package com.tepth.busfix.main.login;

import com.tepth.busfix.bean.reponse.User;
import com.tepth.busfix.network.ApiModel;
import com.tepth.busfix.network.Network;

import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
* Created by TMVPHelper on 2017/03/13
*/
public class LoginModel implements LoginContract.Model{

    @Override
    public Observable<ApiModel<User>> login(String account, String password) {
       return Network.getApiService().login(account,password).subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread());
    }
}